let vue=new Vue({
   el:'.page-content',
    data:{
       upDema:{}
    },
    methods:{
       showUpdate:function (uid) {
           axios({
               url:`demand/showUpdate/${uid}`
           }).then(rs=>{
               this.upDema=rs.data
           }).catch(error=>{layer.msg(error.message)})
       },
        doUpdate:function () {
            axios({
                url: 'demand/doUpdate',
                method:'put',
                data:this.upDema
            }).then(rs=>{
                let index=parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
                parent.layer.message='更新成功'
            }).catch(error=>{
                layer.msg(error.message)
            })
        },
        hideWindow:function () {
            let index=parent.layer.getFrameIndex(window.name);
            parent.layer.close(index)
        }
    },
    created:function () {
        this.showUpdate(parent.layer.uid)
    }
});